﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Keleyi.Com.Model;
using Keleyi.Com.KBLL;
using System.Web.Services;
using System.IO;


namespace Keleyi.Com.KWeb.Controllers
{
    [Authorize]
    public class MessageAdminController : Controller
    {
        //
        // GET: /MessageAdmin/

        public ActionResult Index()
        {
            Message k_message = new Message();
            IList<MessageInfo> k_infoList = k_message.GetListInside();
            return View(k_infoList);
        }

        [HttpPost]
        public bool TurnIsShow(FormCollection collection)
        {


            Message k_message = new Message();

            string k_kid = collection["kid"], k_kisshow = collection["kisshow"];

            return k_message.TurnIsShow(Convert.ToInt32(collection["kid"]), Convert.ToBoolean(collection["kisshow"]));
        }
    }
}
